package com.xyoto.community.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * ClassName:   获取问答评论列表DTO
 * Author:      挽风
 * Date:        2020
 * Copyright:   2020 by 挽风1.0版本
 * Description:
 **/

@Data
@ApiModel("查询问答评论DTO")
public class GetQuestionCommentDTO {

    @ApiModelProperty("分页查询DTO")
    @Valid
    private PageDTO pageDTO;

    /**
     * 初始化pageDTO对象便于进行参数校验
     */
    public GetQuestionCommentDTO(){
        this.pageDTO = new PageDTO();
    }

    @ApiModelProperty("问答id")
    @NotNull(message = "问答id不能为空")
    @Min(value = 1, message = "问答id必须大于0")
    private Integer questionId;
}
